home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / comm / fido / wpl_intro.lzh / rexx / uupoll.rexx < prev    next >
OS/2 REXX Batch file  |  1993-01-28  |  1KB  |  66 lines

  1. /* UUPoll.rexx  For use with WPL and AmigaUUCP 1.13+ */
  2.  
  3. /*
  4.  * This script allows WPL to handle the dialing for you rather
  5.  * than requiring that the line be taken down before each call
  6.  *
  7.  * Russell McOrmond   rwm@Atronx.OCUnix.On.Ca   {tigris,alzabo,...}!atronx!rwm 
  8.  * FidoNet 1:163/109  Net Support: (613) 230-2282  Amiga-Fido Support  1:1/109 
  9.  * Gateway for .Amiga.OCUnix.On.Ca    Current WPL 'keeper of sources'.
  10.  *
  11.  */
  12.  
  13.  
  14. Options RESULTS
  15. Options failat 99999
  16.  
  17. RC = 0
  18.  
  19. parse arg callsystem rest
  20.  
  21. x=Open('lsys',"UULib:l.sys",'R')
  22.  
  23. if x=0 then do
  24.    say "Error reading UULib:l.sys file!!!"
  25.    Exit 1
  26. end
  27.  
  28. if (callsystem = 'all') | (callsystem = 'hasmail') then spoolfiles=Showdir("uuspool:",'Files')
  29.  
  30. do forever
  31.  
  32.    Line=ReadLn('lsys')
  33.  
  34.    if EOF('lsys') then Leave
  35.  
  36.    if Left(Line,1)='#' then Iterate
  37.  
  38.    Parse var Line System ' ' Times ' ' Device ' ' Baud ' ' Phone ' ' Junk
  39.  
  40.    if (Times = 'Never') then Iterate   
  41.  
  42.    if (callsystem ~= 'all') & (callsystem ~= 'hasmail') & (callsystem ~= System)
  43.                then Iterate
  44.  
  45.    if (callsystem = 'hasmail') & ( index(spoolfiles,'C.' || System) < 1)
  46.                 then Iterate 
  47.  
  48.    myhost='SLAVE2'
  49.  
  50.    Address value myhost
  51.    'call '||system
  52.  
  53.    if (callsystem ~= 'all') & (callsystem ~= 'hasmail') then Leave
  54.  
  55.    adelay= Getclip('wsched-delay')
  56.  
  57.    if ( words(adelay) == 1) then do
  58.          say 'Delay for' adelay 'seconds'
  59.          call delay (50*adelay)  /* delay for 'quantum' seconds */
  60.    end
  61. end
  62.  
  63. x=Close('lsys')
  64.  
  65. Exit RC
  66.